<?php 
  require_once('nav.php');
 ?>
    <div class="col-sm-9 col-md-10">
      <?php 
       $sql = 'select * from flower';
       $result = fetch_array($sql); 
       ?>
       <center><h3>鲜花列表</h3></center>
   <table class="table table-hover"> 
   <tr>
     <th>编号</th>
     <th>鲜花标题</th>   
     <th>鲜花产地</th>
     <th>鲜花简介</th>
     <th>添加时间</th>
     <th>点击量</th>
     <th>操作</th>
   </tr>
   <?php
    foreach ($result as $row) {
     echo '<tr>';
     echo '<td>'.$row['zq_id'].'</td>';
     echo '<td>'.'<a href="detail.php?id='.$row['zq_id'].'">'.$row['zq_title'].'</a>'.'</td>';  
     echo '<td>'.$row['zq_place'].'</td>';  
     echo '<td>'.$row['zq_intro'].'</td>';  
     echo '<td>'.$row['zq_adddate'].'</td>';  
     echo '<td>'.$row['zq_hint'].'</td>';
   //  echo '<td align="center"><img src='.$row['pic'].' width=60 height=80></td>';  
     echo '<td><a class="btn btn-default" href="=xiugai.php?id='.$row['zq_id'].' ">修改</a>  
     <a  class="btn btn-default" href="delflower.php?id='.$row['zq_id'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
     echo '</tr>';  
    }
    echo '</table>';  
    $totalrows = count($result);
    echo "<table align='center'><tr><td>共有{$totalrows}条记录</td></tr></table>"   
   ?>

    </div>
    <?php 
      require_once('footer.php');
     ?>
 
   